import NewNanobot, Game, Board, Environment, pygame, sys, os, copy, Greedybot #@UnresolvedImport

def main():
    rand = 0
    # Create the omniscient master grid
    (grid, dimensions) = Game.readFile("finaltask.txt", rand)
    masterGrid = grid
    
    # Assigns the master grid as the masterBoard for all nanobots
    for object in masterGrid.objects:
        if isinstance(object,NewNanobot.Nanobot):
        #if isinstance(object,Greedybot.GreedyNanobot):
            object.masterBoard = masterGrid
        if isinstance(object,Environment.Block):
            object.masterBoard = masterGrid
    Game.GameGUI(masterGrid, dimensions).testStart()

if __name__=="__main__":
    main()